<?php
/**
  * Mar 6, 2008
  *
  * Coded by: Ropu
  *
  */

?>

<style type="text/css">

td.error {
  color: red;
  font-size:13px;
  text-align:center;
}
body {
   font-family:verdana,arial;
}
table.canvas_table
{
  empty-cells: show;
  border-collapse: collapse;
  border: thin inset rgb(100,100,100);  
  background-color: rgb(255,255,255);
  text-align:left;
  vertical-align: middle;
  width:100%;
}
input.button
{
  border: thin outset rgb(100,100,100);
  background-color: rgb(220,220,220)
}
h2
{
  text-align:center;
  font-family:verdama;
  font-size:16px;
  overflow:hidden;
}
th
{
  font-family:verdama;
  font-size:14px;overflow:hidden;
}
a:hover {
  text-decoration:underline;
}
a {
  color:#3B5998;
  text-decoration:none;
}
div.table_title {
  text-align:center;
  font-family:verdama;
  font-size:20px;
  overflow:hidden;
  height:25px;
	vertical-align: bottom;
}
div.table_subtitle {
  text-align:center;
  font-family:verdama;
  font-size:16px;
  overflow:hidden;
  height:18px;
	vertical-align: bottom;
}
div.app_description {
  font-family:verdama;
  font-size:14px;
  overflow:auto;
	vertical-align: bottom;
	height:50px;
}
div.template_body {
  vertical-align: top;
  width:100%;
}
</style>
<div class="template_body">
  <div class="table_title">
  <?=$lang['myapps']['application_list'];?>
  </div>
  <div class="table_subtitle">
    <a href="javascript:goToUrl('editapp.php');void(0);"><?=$lang['myapps']['add_app'];?></a>
  </div>
  <?php
if(count($apps)) {  
foreach($apps as $app) {
?>
	<table class="canvas_table" id="app">
     <tr>
       <td rowspan="2" width="62px">
         <a href="javascript:goToUrl('editapp.php?id=<?=$app->getId();?>');void(0);"><img onError="this.onerror=''; this.src='<?=WS_HOME_DIR;?>images/gadget_default_icon.png'" src="<?=$app->getThumb();?>" border="0" style="height:60px;width:60px"/></a>
       </td>
       <td>
         <a href="javascript:goToUrl('editapp.php?id=<?=$app->getId();?>');void(0);"><?=$app->getTitle();?></a>
       </td>
       <td width="100">
         <a href="javascript:goToUrl('editapp.php?id=<?=$app->getId();?>');void(0);"><?=$lang['myapps']['version'];?></a>
       </td>
     </tr>
     <tr>
       <td>
         <div class="app_description"><?=nl2br(htmlentities($app->getDescription()));?></div>
       </td>
       <td>
         <a href="javascript:goToUrl('editapp.php?id=<?=$app->getId();?>');void(0);"><?=$app->getLastVersion()->getVersion();?></a>
       </td>
     </tr>
  </table><br />
<?php
  }
} else {
?>
  <table style="width: 100%;">
     <tr>
       <td style="text-align: center;">
         <?=$lang['profile']['no_apps_yet'];?>
       </td>
     </tr>
  </table>
<?php  
}
?>
</div>
